﻿//
// Copyright (c) 2024 BPer
//

#ifndef BPERPLAYER_INCLUDE_BPERWINPLAYFACTROY_H_
#define BPERPLAYER_INCLUDE_BPERWINPLAYFACTROY_H_
#include <bperutil/BPerAvInfoType.h>

class BPerPainter{
public:
	BPerPainter();
	virtual ~BPerPainter();
	virtual void draw(void *win,BPerRect *prect,BPerColor *pcolor)=0;
};
class BPerWinPlay{
	public:
	BPerWinPlay();
	virtual ~BPerWinPlay();
	virtual void init(void* pid)=0;
	virtual void initBg(int32_t pwid,int32_t phei)=0;
	virtual	void initVideo(int32_t pwid,int32_t phei,BPerYuvType sdfe)=0;
	virtual	void initText(char *pname,BPerColor *pcolor)=0;

	virtual void reInitVideo(int32_t pwid,int32_t phei,BPerYuvType sdfe)=0;
	virtual void reInitText(char *pname,BPerColor *pcolor)=0;


	virtual void renderPreview(uint8_t* pdata)=0;
	virtual void render(uint8_t* pdata)=0;
	virtual void render(uint8_t* pdata,int64_t ptimestamp)=0;
	virtual void renderBg(BPerColor *pcolor)=0;
	int32_t m_width,m_height;
};
class BPerWinPlayFactroy {
public:
	BPerWinPlayFactroy();
	virtual ~BPerWinPlayFactroy();
	BPerPainter *createPainter();
	BPerWinPlay *createWinPlay();
};

#endif /* BPERPLAYER_INCLUDE_BPERWINPLAYFACTROY_H_ */
